feat(cli): add deepcode completion <bash|zsh|fish> (Codex parity)#152
Merged
Conversation
Codex ships `codex completion`; DeepCode had no shell completion. Adds a `completion` subcommand that prints a bash / zsh / fish completion script covering the top-level flags and subcommands. Unknown or missing shell prints a usage message and exits 2. Smoke-tested end-to-end (`node dist/cli.js completion bash|fish`) plus 8 unit tests. Flag/subcommand lists live in completion.ts with a note to keep them in sync with parse-args.ts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Codex ships
codex completion <shell>; DeepCode had no shell completion at all. This adds acompletionsubcommand that prints a bash / zsh / fish completion script covering the top-level flags and subcommands. Unknown or missing shell prints a usage message and exits 2.Install examples:
eval "$(deepcode completion bash)"deepcode completion zsh > "${fpath[1]}/_deepcode"deepcode completion fish > ~/.config/fish/completions/deepcode.fishTest plan
pnpm typecheckpnpm --filter deepcode-cli test— 109 passing, incl. 8 new tests (per-shell script content,isCompletionShell,runCompletionexit codes)node dist/cli.js completion bash|fishemit valid scripts;completion powershell→ usage + exit 2prettier --check+eslintcleanDocumentation
--helptext updated (newcompletionline). Flag/subcommand lists carry a note to keep them in sync withparse-args.ts.Release notes label
release-notes:featureRelated
Codex/Claude Code/DeepCode capability-alignment review. Codex parity:
codex completion.